import { ApiProperty } from '@nestjs/swagger';
import { IsOptional, IsString, IsDateString, IsEnum } from 'class-validator';
import { PaginationDto } from '../../../common/dto/pagination.dto';

/**
 * 查询比赛DTO
 */
export class QueryMatchDto extends PaginationDto {
  @ApiProperty({ 
    description: '赛事名称',
    required: false 
  })
  @IsOptional()
  @IsString()
  leagueName?: string;

  @ApiProperty({ 
    description: '主队名称',
    required: false 
  })
  @IsOptional()
  @IsString()
  homeTeam?: string;

  @ApiProperty({ 
    description: '客队名称',
    required: false 
  })
  @IsOptional()
  @IsString()
  awayTeam?: string;

  @ApiProperty({ 
    description: '开始时间',
    required: false 
  })
  @IsOptional()
  @IsDateString()
  startTime?: string;

  @ApiProperty({ 
    description: '结束时间',
    required: false 
  })
  @IsOptional()
  @IsDateString()
  endTime?: string;

  @ApiProperty({ 
    description: '竞彩编号',
    required: false 
  })
  @IsOptional()
  @IsString()
  jingcaiNumber?: string;

  @ApiProperty({ 
    description: '北单编号',
    required: false 
  })
  @IsOptional()
  @IsString()
  beidanNumber?: string;

  @ApiProperty({ 
    description: '时间筛选类型：current-根据当天中午12:35为分界点的当前时段数据，historical-除current规则外的历史数据',
    enum: ['current', 'historical'],
    required: false 
  })
  @IsOptional()
  @IsEnum(['current', 'historical'])
  dateFilter?: 'current' | 'historical';

  @ApiProperty({ 
    description: '推荐状态筛选：recommended-已推荐的数据，pending-未推荐的数据',
    enum: ['recommended', 'pending'],
    required: false 
  })
  @IsOptional()
  @IsEnum(['recommended', 'pending'])
  recommendationStatus?: 'recommended' | 'pending';
}